package org.vidi.demo.business.controller;

import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.vidi.demo.business.entity.People;
import org.vidi.demo.business.service.PeopleService;

@RestController
@RequestMapping("/people")
@AllArgsConstructor
public class PeopleController {

    private final PeopleService peopleService;

    @GetMapping("/get")
    public People getPeople(Integer id) {
        return peopleService.getById(id);
    }

}
